import 'package:flutter/material.dart';
import 'package:flutter_demo/mixin/base_page.dart';

import '../../generated/l10n.dart';

class ThemePage extends StatefulWidget with BasePage {
  const ThemePage({super.key});

  @override
  State<ThemePage> createState() => _ThemePage();
}

class _ThemePage extends State<ThemePage> {
  var _isSwitchOpen = false;

  @override
  Widget build(BuildContext context) {
    // Theme.of(context).priaryColor;
    // Theme.of(context).colorScheme.primary;
    // Theme.of(context).colorScheme.onPrimary;
    return Column(
      children: [
        Switch(value: _isSwitchOpen, onChanged: (value) {
          setState(() {
            _isSwitchOpen = value;
          });
        }),
        FilledButton(onPressed: () {},
            child: Text(S.of(context).test))
      ],
    );
  }

}